package cn.itsource.org.controller;

import cn.itsource.org.domain.TShop;
import cn.itsource.org.query.ShopQuery;
import cn.itsource.org.service.IShopService;
import cn.itsource.utils.AjaxResult;
import cn.itsource.utils.PageList;
import cn.itsource.vo.ShopVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/shop")
public class ShopController {
    @Autowired
    private IShopService shopService;
    @PostMapping
    public PageList<TShop> findPageByParam(@RequestBody ShopQuery query) {
        return shopService.findPageByParam(query);
    }

    @PostMapping("/settlement")
    public AjaxResult settlement(@RequestBody ShopVo vo){

        return shopService.settlement(vo);
    }

    @GetMapping("/shenghe")
    public AjaxResult shenghe(Long id,Integer state){
        return shopService.shenghe(id,state);
    }

}
